home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-05-26 | 680 b | 42 lines | [TEXT/MPS ] |
- UNIT Timing;
-
- INTERFACE
-
- {$PUSH} {$J+}
-
- { The actual variables and code are contained in a
- separate assembly language file. The assembled output
- must be linked with programs using this unit }
-
- TYPE
- Timer = COMP;
-
- CONST
- MsPerClock = 1.2766E-3;
-
- VAR
- unitComp: LONGINT; { Compensation for one call }
-
- totComp: COMP; { Accumulated compensation }
-
- {$POP}
-
-
- PROCEDURE InitTimer (VAR t: Timer);
-
- { Initializes a timer (t := 0) }
-
-
- PROCEDURE StartTimer (VAR t: Timer);
-
- { Starts a timer (t := t - Time + totComp;
- totComp := totComp + unitComp) }
-
-
- PROCEDURE StopTimer (VAR t: Timer);
-
- { Stops a timer (t := t + Time - totComp;
- totComp := totComp + unitComp) }
-
- END.
-